#include <iostream>
#include <fstream>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

using namespace std;

int main(){ 
      ofstream file;
      file.open("input.txt");
      int n;
      int *a;
      /* initialize random seed: */
      srand ( time(NULL) );
    
      /* generate secret number: */
      n = rand() % 100 + 1;
      //a = (int*)malloc(n*sizeof(int));
      a = new int[n];
      for (int i = 0; i <= n; i++)
      {
          a[i] = rand() % 10 + 1;
          file << a[i];
          if(((i + 1) % 9) == 0) file << endl;
          else file << " * ";
      }
      
     file.close();
     cin.get();
     return 1;       
     
     /*FILE *f;
     if((f = fopen("input.txt", "w")) == NULL){
           cout << "Can't open file!";
           getch();
           return 0;
           }
           fprintf(f, "%d", 3);
      
      return 1;*/
}
